import {  CommunityListParams } from '@/types/community';
import { request } from '@umijs/max';

// 获取小区列表
export async function getCommunityList(params: CommunityListParams) {
  return request('/api/community/list', {
    method: 'GET',
    params,
  });
}

// 更新小区描述
export async function updateCommunityDesc(id: string, desc: string) {
  return request('/api/community/updateDesc', {
    method: 'POST',
    data: { id, desc },
  });
}

// 删除小区
export async function deleteCommunity(id: string) {
  return request('/api/community/delete', {
    method: 'POST',
    data: { id },
  });
}
